package com.tpshion.cloud.auth.domain.dto;

import com.tpshion.cloud.common.support.Constants;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 修改用户数据
 */
@Valid
public class EditUserDto {

    @Size(max = 64, message = "用户id长度不能超过64位")
    @NotEmpty(message = "用户id不能为空")
    private String id;

    private String roleId;

    @Size(min = 2,max = 20,message = "用户名长度大于3位小于20位")
    private String username;

    @Pattern(regexp = Constants.PHONE_REGEXP, message = "手机号不正确")
    private String phone;

    @Pattern(regexp = Constants.EMAIL_REGEXP, message = "邮箱不正确")
    private String email;

    private String state;

    private String note;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return "EditUserDto{" +
                "id='" + id + '\'' +
                ", roleId='" + roleId + '\'' +
                ", username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", state='" + state + '\'' +
                ", note='" + note + '\'' +
                '}';
    }
}
